package com.itheima.day02.d01_duotai;

public class Test {
    public static void breed(Animal a){
        if(a instanceof Cat){
            Cat c = (Cat)a;
            c.eatCatlong();
        }else {
            a.eat();
        }
    }
    public static void main(String[] args) {
        breed(new Cat("w",1,"1"));
        breed(new Dog());
        breed(new Pig());
    }
}
